<template>
<div>
<chart :options="options" theme="walden" ></chart>
<chart :options="options" theme="walden" ></chart>
</div>
</template>

<style>
.echarts {
  height: 300px;
}
</style>

<script>
// import Vue from 'vue'
import ECharts from 'vue-echarts/components/ECharts.vue'
import 'echarts/lib/chart/bar'
import 'echarts/lib/component/polar'
import 'echarts/lib/component/title'
import 'echarts/lib/component/tooltip'


import theme from '../assets/walden.json'
//Vue.component('chart', ECharts)

ECharts.registerTheme('walden', theme)

export default {
  // components: {
  //   chart: ECharts
  // },
  data: function () {
   
    return {
      options: {
        title: {
          text: '异步数据加载示例'
        },
        tooltip: {},
        legend: {
          data: ['销量']
        },
        xAxis: {
          data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
        },
        yAxis: {
          axisLabel: {show: true}
        },
        series: [{
          name: '销量',
          data: [5, 20, 36, 10, 10, 20],
          type: 'bar'
        }]
      }
    }
  
  }
}
</script>